package com.course_design.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.course_design.dao.RuleMapper;
import com.course_design.entity.Rule;

@Service
public class RuleService {
	@Autowired
	private RuleMapper ruleMapper;
	public List<Rule> queryAllRule(){
		List<Rule> rules =ruleMapper.selectByExample(null);
		return rules;
	}
	public Rule queryRuleByRuleId(Integer ruleId) {
		return ruleMapper.selectByPrimaryKey(ruleId);
	}
}
